﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TimeCalc
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();

            tmIncrease.Value = DateTime.Now.AddTicks(-DateTime.Now.TimeOfDay.Ticks);
        }

        private void btnNow_Click(object sender, EventArgs e)
        {
            tmSource.Value = DateTime.Now;
        }

        private void tmValueChanged(object sender, EventArgs e)
        {
            tmResult.Value = tmSource.Value.AddTicks(tmIncrease.Value.Ticks);
        }

        private void FormMain_Load(object sender, EventArgs e)
        {
            tmIncrease.Focus();
        }
    }
}
